using System;
using System.ComponentModel.DataAnnotations;

namespace MvcMovieApp.Models
{
    public class Movie
    {
        public int Id { get; set; }
     
        [Required(ErrorMessage = "Title is required")]
        public string Title { get; set; }

        [Required(ErrorMessage = "Date is required")]
        public DateTime ReleaseDate { get; set; }

        [Required(ErrorMessage = "Specify the genre")]
        public string Genre { get; set; }

        [Required(ErrorMessage = "Specify the price")]
        [Range(1, 100, ErrorMessage = "Price must be between $1 & $100")]
        public decimal Price { get; set; }

        [StringLength(5)]
        public string Rating { get; set; }
    }
}